# -*- coding: utf-8 -*-

"""
@Datetime: 2019/5/21
@Author: Zhang Yafei
"""


def outer(outertionName):
    print("-----outer---1----")

    def inner():
        print("----inner---1--")
        ret = outertionName()
        print("---inner---2---")
        return ret

    print("----outer---2---")
    return inner


@outer
def func():
    print("---func----")
    return "haha"


ret = func()
print(f"func return value is {ret}")

"""
-----outer---1----
----outer---2---
----inner---1--
---func----
---inner---2---
func return value is haha
"""
